import request from "@/utils/request.js";

export const gerRegister = (data) => {
	const { adult, child } = data;
	return request({
		url: '/travel/order/register',
		method: 'post',
		data:{
			productId: data.productId,
			name: data.name,
			phone: data.phone,
			adultCount: adult.num,
			adultPrice: adult.raw,
			childCount: child.num,
			childPrice: child.raw,
			totalPrice: (adult.num*adult.raw)+(child.num*child.raw)
		}
	})
}
export const gerChangeToPay = (id) => {
	console.log("ticketId:",id);
	return request({
		url: `/travel/order/pay/${id}`,
		method: 'get'

	})
}
